package cn.jiyun.mapper;

import cn.jiyun.pojo.Dto;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DtoMapper {
    @Insert("INSERT INTO `lemeng_user`.`dto` ( `name`, `sex`, `pwd`, `birth`) VALUES (#{name},#{sex},#{pwd},#{birth})")
    void dtoadd(Dto dto);

    @Select("select * from dto")
    List<Dto> list();

    @Select("select * from dto where name=#{name} and pwd=#{pwd}")
    Dto login(Dto dto);
}
